import {createApp} from 'vue'
import {createPinia} from 'pinia'
import App from './App.vue'
import router from './router'

// 全局组件
import LoadingIndicator from '@/components/LoadingIndicator.vue'
import NotificationContainer from '@/components/NotificationContainer.vue'

const app = createApp(App)

// 插件安装
app.use(createPinia())
app.use(router)

// 全局组件注册
app.component('LoadingIndicator', LoadingIndicator)
app.component('NotificationContainer', NotificationContainer)

// 全局错误处理
app.config.errorHandler = (err) => {
    console.error('Global error:', err)
    // 这里可以添加通知系统调用
}

app.mount('#app')
